<?php

namespace common\models\statistics;

use Yii;

/**
 * This is the model class for table "{{%statistics_follow_report}}".
 *
 * @property int $id
 * @property string $year 年份
 * @property int $patient_id 患者id
 * @property int $clinic_id 诊室id
 * @property int $month_1
 * @property int $month_2
 * @property int $month_3
 * @property int $month_4
 * @property int $month_5
 * @property int $month_6
 * @property int $month_7
 * @property int $month_8
 * @property int $month_9
 * @property int $month_10
 * @property int $month_11
 * @property int $month_12
 * @property int $month_total 合计
 * @property int $created_at
 * @property int $updated_at
 */
class FollowReport extends \common\models\BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%statistics_follow_report}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['year'], 'safe'],
            [['patient_id', 'clinic_id', 'month_1', 'month_2', 'month_3', 'month_4', 'month_5', 'month_6', 'month_7', 'month_8', 'month_9', 'month_10', 'month_11', 'month_12', 'month_total', 'created_at', 'updated_at'], 'integer'],
            [['year', 'patient_id', 'clinic_id'], 'unique', 'targetAttribute' => ['year', 'patient_id', 'clinic_id']],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'year' => '年份',
            'patient_id' => '患者id',
            'clinic_id' => '诊室id',
            'month_1' => 'Month 1',
            'month_2' => 'Month 2',
            'month_3' => 'Month 3',
            'month_4' => 'Month 4',
            'month_5' => 'Month 5',
            'month_6' => 'Month 6',
            'month_7' => 'Month 7',
            'month_8' => 'Month 8',
            'month_9' => 'Month 9',
            'month_10' => 'Month 10',
            'month_11' => 'Month 11',
            'month_12' => 'Month 12',
            'month_total' => '合计',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
